package com.qf.back;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;

/**
 * @ClassName beanPostProcessor
 * @Author xiao宋
 * @Date 22:18  2022/9/27
 * @Version 1.0
 * @Description TODO
 */
public class beanPostProcessor implements BeanPostProcessor {

    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("后处理器：在init之前执行："+bean.getClass());
        return bean;
    }
    public Object postProcessAfterInitialization(Object bean, String beanName)throws  BeansException{
        System.out.println("后处理器：在init之后执行："+bean.getClass());
        return null;
    }


}
